Method and apparatus for prompting that virtual object is attacked, terminal, and storage medium

ABSTRACT

A method and an apparatus includes prompting that a virtual object is attacked. The method includes: displaying a user interface (UI) including a target virtual object located in a virtual environment. A being-attacked direction of the target virtual object is obtained. A display position of the being-attacked direction prompt information is obtained according to the being-attacked direction. The being-attacked direction prompt information is used for indicating the being-attacked direction. The being-attacked direction prompt information is displayed in the UI according to the display position. The being-attacked direction is prompted, and content of the being-attacked prompt is diversified.

RELATED APPLICATION

This application claims priority as a Continuation to U.S. applicationSer. No. 17/156,138, entitled “METHOD AND APPARATUS FOR PROMPTING THATVIRTUAL OBJECT IS ATTACKED, TERMINAL, AND STORAGE MEDIUM” and filed Jan.22, 2021, which claims priority to Chinese Patent Application No.201910838705.3, entitled “METHOD AND APPARATUS FOR PROMPTING THATVIRTUAL OBJECT IS ATTACKED, TERMINAL, AND STORAGE MEDIUM” and filed onSep. 5, 2019, each of which are incorporated herein by reference intheir entirety.

FIELD OF THE TECHNOLOGY

Embodiments of this application relate to the field of computer andInternet technologies, and in particular, to a method and an apparatusfor prompting that a virtual object is attacked, a terminal, and astorage medium.

BACKGROUND OF THE DISCLOSURE

At present, in some shooter games (STGs) at a mobile side, a virtualobject controlled by a player may be attacked by other virtual objectsin a game scene provided during a game battle.

In the related art, when the virtual object controlled by the player isattacked by an enemy virtual object, a client displays correspondingprompt information in a game interface, for example, displaying theinterface turning red and a health point decreasing, and playing abeing-attacked sound.

Current being-attacked prompts are relatively undiversified and anamount of provided information is limited.

SUMMARY

Embodiments of this application provide a method and an apparatus forprompting that a virtual object is attacked, a terminal, and a storagemedium, which may be configured to resolve a technical problem in therelated art that being-attacked prompts are relatively undiversified andan amount of provided information is limited. The technical solutionsare as follows:

According to one embodiment of this application, a method for promptingthat a virtual object is attacked, applicable to a mobile terminal,includes:

displaying a user interface (UI), the UI including a target virtualobject located in a virtual environment;

obtaining a being-attacked direction of the target virtual object, thebeing-attacked direction is a direction in which the target virtualobject is attacked;

determining a display position of being-attacked direction promptinformation according to the being-attacked direction, thebeing-attacked direction prompt information is used for indicating thebeing-attacked direction; and

displaying the being-attacked direction prompt information in the UIaccording to the display position.

According to another embodiment of this application, a method forprompting that a virtual object is attacked, applicable to a mobileterminal, includes:

displaying a UI, the UI including a target virtual object located in avirtual environment;

obtaining a being-attacked direction of the target virtual object, thebeing-attacked direction is a direction in which the target virtualobject is attacked;

determining, according to the being-attacked direction, a jitterparameter of a virtual weapon held by the target virtual object; and

causing, according to the jitter parameter, the virtual weapon tojitter.

According to still another embodiment of this application, an apparatusfor prompting that a virtual object is attacked, includes:

an interface display module, configured to display a UI, the UIincluding a target virtual object located in a virtual environment;

a direction obtaining module, configured to obtain a being-attackeddirection of the target virtual object, the being-attacked direction isa direction in which the target virtual object is attacked;

a position determination module, configured to determine a displayposition of being-attacked direction prompt information according to thebeing-attacked direction, the being-attacked direction promptinformation is used for indicating the being-attacked direction; and

an information display module, configured to display the being-attackeddirection prompt information in the UI according to the displayposition.

According to another embodiment of this application, an apparatus forprompting that a virtual object is attacked, includes:

an interface display module, configured to display a UI, the UIincluding a target virtual object located in a virtual environment;

a direction obtaining module, configured to obtain a being-attackeddirection of the target virtual object, the being-attacked direction isa direction in which the target virtual object is attacked;

a parameter determination module, configured to determine, according tothe being-attacked direction, a jitter parameter of a virtual weaponheld by the target virtual object;

and

a jitter control module, configured to cause, according to the jitterparameter, the virtual weapon to jitter.

According to another embodiment of this application, a mobile terminal,includes a processor and a memory, the memory storing at least oneinstruction, at least one program, a code set, or an instruction set,the at least one instruction, the at least one program, the code set, orthe instruction set being loaded and executed by the processor toimplement the method for prompting that a virtual object is attacked.

According to another embodiment, a computer-readable storage medium isprovided, storing at least one instruction, at least one program, a codeset, or an instruction set, the at least one instruction, the at leastone program, the code set, or the instruction set being loaded andexecuted by a processor to implement the method for prompting that avirtual object is attacked.

According to another embodiment, a computer program product is provided,the computer program product, when run on a computer, causing thecomputer to perform the method for prompting that a virtual object isattacked.

According to the technical solutions provided in the embodiments of thisapplication, a being-attacked direction of a virtual object is obtained,a display position of being-attacked direction prompt information isdetermined according to the being-attacked direction, and thebeing-attacked direction prompt information is displayed in a UI, toprompt the being-attacked direction. Compared with the related art inwhich a being-attacked prompt is used only for prompting that thevirtual object is attacked, the being-attacked prompt in the embodimentsof this application not only prompts that the virtual object isattacked, but also prompts the direction in which the virtual object isattacked, thereby diversifying content of the being-attacked prompt,providing more valuable information, and providing more reference for asubsequent operation of a user.

In addition, according to the embodiments of this application, after thebeing-attacked direction of the virtual object is obtained, a virtualweapon held by the virtual object is further controlled according to thebeing-attacked direction to jitter, to allow the user to perceive theattack and determine the being-attacked direction according to a jitterstatus of the virtual weapon, thereby prompting the being-attackeddirection, diversifying content of the being-attacked prompt, andproviding more valuable information. Furthermore, such a manner is moreintuitive and clearer, making it easier to draw the attention of theuser.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions of the embodiments of thisapplication more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of this application, and a person of ordinaryskill in the art may still derive other accompanying drawings accordingto these accompanying drawings without creative efforts.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application.

FIG. 2 is a schematic structural diagram of a mobile terminal accordingto an embodiment of this application.

FIG. 3 is a flowchart of a method for prompting that a virtual object isattacked according to an embodiment of this application.

FIG. 4 is a schematic diagram of calculating a display position ofbeing-attacked direction prompt information according to an embodimentof this application.

FIG. 5 is one embodiment of a schematic diagram of a UI involved in theembodiment shown in FIG. 3 .

FIG. 6 is one embodiment of a schematic diagram of a UI involved in theembodiment shown in FIG. 3 .

FIG. 7 is one embodiment of a schematic diagram of a UI involved in theembodiment shown in FIG. 3 .

FIG. 8 is one embodiment of a schematic diagram of a UI involved in theembodiment shown in FIG. 3 .

FIG. 9 is a flowchart of a method for prompting that a virtual object isattacked according to another embodiment of this application.

FIG. 10 is a flowchart of a method for prompting that a virtual objectis attacked according to still another embodiment of this application.

FIG. 11 is a schematic diagram of calculating a jitter parameteraccording to an embodiment of this application.

FIG. 12 is a schematic diagram of a UI according to yet anotherembodiment of this application.

FIG. 13 is a schematic diagram of causing a virtual weapon to jitteraccording to another embodiment of this application.

FIG. 14 is a flowchart of a method for prompting that a virtual objectis attacked according to still yet another embodiment of thisapplication.

FIG. 15 is a block diagram of an apparatus for prompting that a virtualobject is attacked according to an embodiment of this application.

FIG. 16 is a block diagram of an apparatus for prompting that a virtualobject is attacked according to another embodiment of this application.

FIG. 17 is a block diagram of an apparatus for prompting that a virtualobject is attacked according to still another embodiment of thisapplication.

FIG. 18 is a structural block diagram of a mobile terminal according toan embodiment of this application.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of thisapplication clearer, the following further describes implementations ofthis application in detail with reference to the accompanying drawings.

Before embodiments of this application are described, related termsinvolved in this application are explained first.

1. Virtual Scene

A virtual scene is a scene displayed (or provided) when a client of anapplication (such as a game application) runs on a terminal. The virtualscene refers to a scene created for a virtual object to performactivities (such as game competition). The virtual scene may be, forexample, a virtual house, a virtual island, or a virtual map. Thevirtual scene may be a simulated scene of the real world, or may be asemi-simulated semi-fictional scene, or may be an entirely fictionalscene. The virtual scene may be a two-dimensional virtual scene, a2.5-dimensional virtual scene, or a three-dimensional virtual scene, anyof which are merely example embodiments of this application.

2. Virtual Object

A virtual object is a virtual character controlled by a user account inan application. For example, the application is a game application. Thevirtual object is a game character controlled by the user account in thegame application. The virtual object may be in a human form or animal,cartoon, or other forms, which are merely example embodiments of thisapplication. The virtual object may be presented in a three-dimensionalform or a two-dimensional form, any of which are merely exampleembodiments of this application.

In different game applications, operations that can be performed by thevirtual object controlled by the user account may be different. Forexample, in an STG application, the user account may control the virtualobject to perform operations such as shooting, running, jumping, gunpicking up, gun replacing, and bullet loading.

Certainly, in addition to the game applications, the virtual object mayalso be presented to a user and provided with a corresponding functionin applications of another type, for example, an augmented reality (AR)application, a social application, or an interactive entertainmentapplication, which are merely example embodiments of this application.Besides, the form and corresponding function of the virtual object varywith different applications, and may be preset according to an actualrequirement, any of which are merely example embodiments of thisapplication.

3. Virtual Weapon

A virtual weapons is a weapon that can be used by a virtual object in avirtual environment, including a long-range virtual weapon and ashort-range virtual weapon. The long-range virtual weapon is a virtualweapon that can be used to attack another virtual object at a positionrelatively far from the virtual object, such as a pistol, a rifle, asniper rifle, or other virtual guns. The short-range virtual weapon is avirtual weapon that can be used to attack another virtual object at ashort distance, such as a dagger, a sword, a knife, or an axe.

4. Shooter Games (STG)

STG is a type of action game with obvious characteristics of actiongames, and “shooting” needs to be presented in a specific action manner.Generally, STG includes first-person shooter (FPS) and third-personshooter (TPS). In some STGs, a user may switch between a first-personperspective and a third-person perspective.

FPS is an STG in which a user can play in a first-person perspective. Avirtual environment picture in the game is a picture of a virtualenvironment observed with a perspective of a virtual object. In thegame, at least two virtual objects play in a single-round battle mode inthe virtual environment. The virtual object eludes attacks from othervirtual objects and dangers (for example, a poison gas area and a swamp)in the virtual environment to survive in the virtual environment. When ahealth point of the virtual object in the virtual environment is zero,the life of the virtual object in the virtual environment ends, and thefinal virtual object surviving in the virtual environment wins.Optionally, the battle starts with a moment when the first client joinsthe battle, and ends with a moment when the last client exits thebattle. Each client may control one or more virtual objects in thevirtual environment. Optionally, arena modes of the battle may include asingle-player battle mode, a two-player team battle mode, or amulti-player team battle mode. Battle mode is merely one exampleembodiment of this application.

TPS is an STG in which a user can play in a third-person perspective. Avirtual environment picture in the game is a picture of a virtualenvironment observed with a perspective of an onlooker. In the game, theuser may see a virtual object controlled by the user, which helps theuser observe injuries, surroundings, and the like of the virtual objectcontrolled by the user.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application. The implementation environment mayinclude a mobile terminal 10 and a server 20.

The mobile terminal 10 may be a portable electronic device, such as amobile phone (e.g. smart phone), a tablet computer, a game console, anelectronic book (ebook) reader, a multimedia playback device, and/or awearable device. A client of a game application, such as a client of anSTG application, may be installed in the mobile terminal 10.Alternatively, a terminal may not be mobile and may include other typesof electronic devices that may not be portable, including some computersand video game consoles.

The server 20 is configured to provide a back-end service to the clientof the application (for example, a game application) in the mobileterminal 10. For example, the server 20 may be a back-end server of theapplication (for example, the game application). The server 20 may beone server, a server cluster including a plurality of servers, or acloud computing service center.

The mobile terminal 10 and the server 20 may communicate with each otherthrough a network 30. The network 30 may be a wired network or awireless network.

Steps in method embodiments of this application may be performed by themobile terminal. FIG. 2 is a schematic structural diagram of a mobileterminal according to an embodiment of this application. In oneembodiment, the mobile terminal 10 may include a mainboard 110, anexternal output/input device 120, a memory 130, an external interface140, a touch system 150, and a power supply 160.

Processing elements such as a processor and a controller are integratedin the mainboard 110.

The external output/input device 120 may include a display component(for example, a display screen), a sound playback component (forexample, a speaker), a sound collecting component (for example, amicrophone), and various buttons.

The memory 130 stores program code and data.

The external interface 140 may include an earphone interface, a charginginterface, a data interface, and the like.

The touch system 150 may be integrated in the display component or thebuttons of the external output/input device 120, and the touch system150 is configured to detect touch operations performed by a user on thedisplay component or the buttons.

The power supply 160 is configured to supply power to other componentsin the mobile terminal 10.

In this embodiment of this application, the processor in the mainboard110 may generate a UI (for example, a game interface) by executing orinvoking the program code and the data stored in the memory, and presentthe generated UI (for example, the game interface) by using the externaloutput/input device 120. During presentation of the UI (for example, thegame interface), a touch operation performed during interaction betweenthe user and the UI (for example, the game interface) may be detectedthrough the touch system 150, and a response is made to the touchoperation.

FIG. 3 is a flowchart of a method for prompting that a virtual object isattacked according to an embodiment of this application. The method isapplicable to the mobile terminal described above, such as a client ofan application (for example, an STG application) in the mobile terminal.The method may include the following steps (301 to 304):

Step 301: Display a UI, the UI including a target virtual object locatedin a virtual environment.

In this embodiment of this application, the UI includes an interface ofan application. Using an STG application as an example, the UI may be adisplay interface of a game battle. The UI is configured to present avirtual environment of the game battle to a user. For example, the UImay include an element in the virtual environment, such as a virtualbuilding, a virtual item, and a virtual object. Optionally, the UIfurther includes some operation controls, such as buttons, sliders, andicons, for the user to operate.

The target virtual object is a virtual object controlled by a client.Optionally, the virtual environment displayed in the UI is a picture ofthe virtual environment observed with a perspective of the targetvirtual object. The perspective is an observation angle for observingwith a first-person perspective or a third-person perspective of thevirtual object in the virtual environment. The perspective in thisembodiment of this application is an angle for observing the virtualenvironment with a first-person perspective of the target virtualobject. Optionally, the perspective is an angle for observing thevirtual environment through a camera model in the virtual environment.

The camera model is a three-dimensional model around the virtual objectin the virtual environment. The camera model is configured to observethe virtual environment or an element in the virtual environment, suchas a virtual object, a virtual item, and a virtual weapon. When thefirst-person perspective is used, the camera model is located near thehead of the virtual object or at the head of the virtual object. Whenthe third-person perspective is used, the camera model may be locatedbehind the virtual object and bound to the virtual object, or may belocated at any position that is a preset distance away from the virtualobject. The virtual object located in the virtual environment may beobserved from different angles through the camera model. Optionally,when the third-person perspective is a first-person over-the-shoulderperspective, the camera model is located behind the virtual object (forexample, the head and shoulders of a virtual character). Optionally, inaddition to the first-person perspective and the third-personperspective, the perspective also includes other perspectives, such as atop perspective. When the top perspective is used, the camera model maybe located above the head of the virtual object. The top perspective isa perspective for observing the virtual environment with an angle fromthe air. Optionally, the camera model is not actually displayed in thevirtual environment. In other words, the camera model is not displayedin the virtual environment displayed in the UI.

Step 302: Obtain a being-attacked direction of the target virtualobject, the being-attacked direction is a direction in which the targetvirtual object is attacked.

In addition to the target virtual object, there are other virtualobjects in the virtual environment. Optionally, the other virtualobjects include an enemy virtual object and a friendly virtual object.The enemy virtual object is a virtual object that has a hostilerelationship with the target virtual object. The friendly virtual objectis a virtual object that has no hostile relationship with the targetvirtual object. For example, the friendly virtual object may belong tothe same team or the same organization as the target virtual object, andthey are in a friend relationship or have a temporary permission tocommunicate with each other.

Optionally, the target virtual object may attack the other virtualobjects in the virtual environment, and the other virtual objects mayalso attack the target virtual object in the virtual environment.Optionally, the attack may be an attack with a virtual weapon, such asshooting with a virtual gun or stabbing with a virtual dagger, or may bean attack without a virtual weapon, such as attacking with a first orkicking with a foot. Optionally, when a distance between a virtualobject and an object to be attacked by the virtual object is relativelyshort, a short-range virtual weapon may be used to attack or no virtualweapon is used. When a distance between a virtual object and an objectto be attacked by the virtual object is relatively long, a long-rangevirtual weapon may be used to attack. Optionally, in this embodiment ofthis application, to prompt that the target virtual object controlled bythe client is attacked while reducing processing overheads of a serverand the client, the client obtains the being-attacked direction of thetarget virtual object only when another virtual object attacks thetarget virtual object with a long-range virtual weapon. This embodimentof this application is described by using an example in which the targetvirtual object is attacked by a long-range virtual weapon and thelong-range virtual weapon is a virtual gun or a virtual shell.Optionally, the target virtual object controlled by the client is nothurt when being attacked by the friendly virtual object. In other words,the target virtual object controlled by the client is hurt and theclient performs subsequent steps only when the target virtual object isattacked by the enemy virtual object.

In this embodiment of this application, a notification that the targetvirtual object is attacked is sent by the server. To be specific, theserver notifies the client that the target virtual object controlled bythe client is attacked. When notifying the client that the targetvirtual object is attacked, the server gives a position of anothervirtual object that attacks the target virtual object. The clientcalculates a being-attacked direction of the target virtual objectaccording to the position and a position of the target virtual object.For example, as shown in FIG. 4 , a virtual environment 40 includes atarget virtual object 41 and an enemy virtual object 42. A ray isconnected to a position A point at which the target virtual object 41 islocated by using a position O point at which the enemy virtual object 42is located as a starting point. A direction of the ray OA is abeing-attacked direction of the target virtual object 41.

In a possible implementation, after the being-attacked direction of thetarget virtual object is obtained, the method further includes:obtaining being-attacked times corresponding to the being-attackeddirection, the being-attacked times are a quantity of times that thetarget virtual object is attacked in the being-attacked direction; anddisplaying being-attacked times prompt information in the UI, thebeing-attacked times prompt information is used for indicating thebeing-attacked times. In this embodiment of this application, theobtaining being-attacked times corresponding to the being-attackeddirection is obtaining being-attacked times of the target virtual objectin the being-attacked direction within a period of time, the period oftime is a duration starting from a current time. For example, as shownin FIG. 5 , when the target virtual object is subject to one attack froma front left direction, being-attacked times prompt information 53 isdisplayed as a triangle in the UI, and there is one triangle. Forexample, as shown in FIG. 6 , when the target virtual object is subjectto three attacks from a front left direction, being-attacked timesprompt information 64 is displayed as triangles in the UI, and there arethree triangles.

In another possible implementation, to enhance an effect of promptingthat the target virtual object is attacked, after the being-attackeddirection of the target virtual object is obtained, the method furtherincludes: determining, according to the being-attacked direction, ajitter direction of the virtual weapon held by the target virtualobject, the jitter direction is a direction in which the virtual weapondeviates from an initial position; and controlling the virtual weapon tojitter according to the jitter direction.

Step 303: Determine a display position of being-attacked directionprompt information according to the being-attacked direction, thebeing-attacked direction prompt information is used for indicating thebeing-attacked direction.

A direction the target virtual object faces before being attacked is aninitial direction. Optionally, the being-attacked direction promptinformation corresponds to a default display position in the UI. Whenthe being-attacked direction prompt information is at the defaultdisplay position, the being-attacked direction prompt information is notdisplayed in the UI. The client calculates a deviation direction and adeviation angle according to the initial direction and thebeing-attacked direction of the target virtual object. The deviationdirection and the deviation angle are used for indicating a directionand an angle by which the display position of the being-attackeddirection prompt information deviates from the default display position.For example, as shown in FIG. 4 , an initial direction of the targetvirtual object 41 is a direction of a ray AB, the being-attackeddirection is the direction of the ray OA, a direction in which the rayOA deviates to the ray AB is the deviation direction, and an anglebetween the ray OA and the ray AB is the deviation angle. The displayposition of the being-attacked direction prompt information can bedetermined according to the deviation direction and the deviation angle.

Step 304: Display the being-attacked direction prompt information in theUI according to the display position.

To improve a display effect of the UI, the being-attacked directionprompt information is displayed only after the client determines thedisplay position. In other words, when the being-attacked directionprompt information corresponds to the default display position, and theclient has not determined the display position of the being-attackeddirection prompt information, the being-attacked direction promptinformation is not displayed at the default display position of the UI.Optionally, to diversify a display style of the being-attacked directionprompt information and improve the display effect of the UI, the displaystyle of the being-attacked direction prompt information is related toat least one type of the following information: a being-attackeddistance, a being-attacked time, being-attacked times, or abeing-attacked damage. For example, if the display style of thebeing-attacked direction prompt information is related to thebeing-attacked damage, when the target virtual object suffers moredamage, the being-attacked direction prompt information is gradually ina darker color, to clearly and timely prompting the user.

In a possible implementation, after the being-attacked direction promptinformation is displayed in the UI according to the display position,the method includes: canceling the display of the being-attackeddirection prompt information in the UI in a case that a display durationof the being-attacked direction prompt information reaches a presetduration, and the target virtual object is subject to no other attacksfrom the being-attacked direction within the preset duration. In thisembodiment of this application, the preset duration is a displayduration preset by the client for the being-attacked direction promptinformation. When the display duration of the being-attacked directionprompt information reaches the preset duration, the display of thebeing-attacked direction prompt information is canceled.

Based on the above, according to the technical solutions provided invarious embodiments of this application, a being-attacked direction of avirtual object is obtained, a display position of being-attackeddirection prompt information is determined according to thebeing-attacked direction, and the being-attacked direction promptinformation is displayed in a UI, to prompt the being-attackeddirection. Compared with the related art in which a being-attackedprompt is used only for prompting that the virtual object is attacked,the being-attacked prompt in this embodiment of this application notonly prompts that the virtual object is attacked, but also prompts thedirection in which the virtual object is attacked, thereby diversifyingcontent of the being-attacked prompt, providing more valuableinformation, and providing more reference for a subsequent operation ofa user. Moreover, in this embodiment of this application, a displaystyle of being-attacked direction prompt information varies with aplurality of factors, thereby diversifying the display style of thebeing-attacked direction prompt information and improving a displayeffect of the UI.

In addition, according to the technical solutions provided in thisembodiment of this application, being-attacked times prompt informationis further displayed in the UI according to being-attacked times of thevirtual object, to help the user more clearly know how specifically thevirtual object controlled by the user is attacked, and deal with theattack in time.

In a possible implementation, the being-attacked direction promptinformation includes: an arc-shaped UI element. The determining adisplay position of being-attacked direction prompt informationaccording to the being-attacked direction includes: determining adisplay position of the arc-shaped UI element according to thebeing-attacked direction; a position of the arc-shaped UI elementrelative to a center matching a position of the target virtual objectrelative to an enemy virtual object that launches the attack.

Optionally, the arc-shaped UI element includes an arc, and the arc isused for indicating the being-attacked direction. For example, as shownin FIG. 5 , when the target virtual object is subject to an attack froma front left direction, an arc of an arc-shaped UI element 51 isdisplayed in a front right direction of a circle 52 corresponding to thearc. For example, as shown in FIG. 6 , when the target virtual object issubject to three attacks from a front left direction, an arc of anarc-shaped UI element 61 is displayed in a front right direction of acircle 62 corresponding to the arc. As shown in FIG. 6 , when beingattacked from the front left direction, the target virtual object isattacked from a right behind direction, and a new arc-shaped UI element63 is displayed in the UI. In this embodiment of this application, thecircle corresponding to the arc of the arc-shaped UI element is notdisplayed in the UI, and the circle in FIG. 5 and FIG. 6 is displayed ina form of a dashed line in the UI merely for description.

A radius of the circle in which the arc corresponding to the arc-shapedUI element is located and a position of a center of the circle are justone example embodiment of this application. Optionally, the centeroverlaps with a central point of a front sight of a virtual weapon heldby the target virtual object. Optionally, the radius of the circle inwhich the arc corresponding to the arc-shaped UI element is located isdetermined by the client according to a size of the UI displayed by theclient. The radius has a positive correlation with the size of the UI.To be specific, a larger UI indicates a larger radius; a smaller UIindicates a smaller radius. For example, because a UI displayed on acomputer is larger than a UI displayed on a mobile phone, acorresponding radius when the client is a computer is larger than acorresponding radius when the client is a mobile phone.

Optionally, the UI includes a first view layer and a second view layer.A display level of the first view layer is higher than a display levelof the second view layer. The arc-shaped UI element is located in thefirst view layer, and a game picture used for displaying the virtualenvironment of the game battle is located in the second view layer.Certainly, in addition to the arc-shaped UI element described above, thefirst view layer may further include some operation controls, such as anoperation control for controlling a posture of the virtual object, andan operation control for controlling virtual equipment assembled by thevirtual object. This is merely one example embodiment of thisapplication.

Optionally, the arc-shaped UI element corresponds to a default displayposition in the UI, and the default display position is determined bythe front sight of the virtual weapon held by the target virtual object.In this embodiment of this application, the position of the arc-shapedUI element relative to the center is represented by a display parameter.The display parameter includes a deviation direction and a deviationangle of a connection line between a central point of the arc-shaped UIelement and the center relative to a standard line. The standard line isa connection line between a central point of the arc-shaped UI elementwhen the arc-shaped UI element is displayed at the default displayposition and the center. For example, as shown in FIG. 7 , a front sight72 of the virtual weapon held by the target virtual object is located ata center of a UI 70, a default display position of an arc-shaped UIelement 71 in the UI 70 is in an area above the center of the UI 70, anda center of a circle in which an arc corresponding to the arc-shaped UIelement 71 is located overlaps with a central point of the front sight72. In this case, a connection line between a central point of thearc-shaped UI element 71 and the center is perpendicular to a sidecorresponding to a length of the UI. To improve the display effect ofthe UI, in this embodiment of this application, when at the defaultdisplay position, the arc-shaped UI element 71 is not displayed in theUI. The arc-shaped UI element is drawn in the UI in FIG. 7 merely fordescribing display of the arc-shaped UI element at the default displayposition. As shown in FIG. 4 , a virtual environment 40 includes atarget virtual object 41 and an enemy virtual object 42. An initialdirection of the target virtual object 41 is a direction of a ray AB, abeing-attacked direction is a direction of a ray OA, a direction inwhich the ray OA deviates to the ray AB is a deviation direction, and anangle between the ray OA and the ray AB is a deviation angle. Thedeviation direction and the deviation angle of the arc-shaped UI elementare calculated according to FIG. 4 . As shown in FIG. 8 , a displayposition of an arc-shaped UI element 81 is adjusted. An angle between aconnection line between a central point of the adjusted arc-shaped UIelement 81 and a center and a connection line between a central point ofthe arc-shaped UI element 81 at a default display position and thecenter is the deviation angle shown in FIG. 4 . A deviation direction ofthe connection line between the central point of the adjusted arc-shapedUI element 81 and the center relative to the connection line between thecentral point of the arc-shaped UI element 81 at the default displayposition and the center corresponds to the deviation direction shown inFIG. 4 .

Based on the above, according to the technical solutions provided in theembodiments of this application, being-attacked direction promptinformation is represented by an arc-shaped UI element, therebyimproving a display effect of a UI. In addition, according to thetechnical solutions provided by embodiments of this application, adisplay style of the arc-shaped UI element may be further adjustedaccording to being-attacked times, thereby helping a user clearly know abeing-attacked direction and being-attacked times of a virtual objectcontrolled by the user, and improving human-computer interactionexperience.

In a possible implementation, as shown in FIG. 9 , the method forprompting that a virtual object is attacked may alternatively includethe following steps (901 to 910):

Step 901: Determine whether a target virtual object is attacked. If yes,perform step 902. If no, end the procedure.

Step 902: Obtain a being-attacked direction.

Step 903: Determine whether the target virtual object is attacked fromthe same direction. If yes, perform step 904. If no, perform step 906.

Step 904: Obtain being-attacked times.

Step 905: Display, according to the being-attacked direction and thebeing-attacked times, being-attacked direction prompt information.

Step 906: Display, according to each different being-attacked direction,a new piece of being-attacked direction prompt informationcorrespondingly.

Step 907: Determine whether the target virtual object is still attacked.If yes, perform step 903. If no, perform step 908.

Step 908: Determine whether a display duration of the being-attackeddirection prompt information reaches a preset duration. If yes, performstep 909. If no, perform step 910.

Step 909: Cancel the display of the being-attacked direction promptinformation.

Step 910: Keep displaying the being-attacked direction promptinformation.

FIG. 10 is a flowchart of a method for prompting that a virtual objectis attacked according to another embodiment of this application. Themethod is applicable to the mobile terminal described above, such as aclient of an application (for example, an STG application) in the mobileterminal. The method may include the following steps (1001 to 1004):

Step 1001: Display a UI, the UI including a target virtual objectlocated in a virtual environment.

Based on the explanation of step 301 in the method for prompting that avirtual object is attacked provided in the optional embodiment of thisapplication, explanation of step 1001 in the method for prompting that avirtual object is attacked provided in this embodiment may be obtained.For the explanation of step 1001, refer to the explanation of step 301as one example.

Step 1002: Obtain a being-attacked direction of the target virtualobject, the being-attacked direction is a direction in which the targetvirtual object is attacked.

Based on the explanation of step 302 in the method for prompting that avirtual object is attacked provided in the optional embodiment of thisapplication, explanation of step 1002 in the method for prompting that avirtual object is attacked provided in this embodiment may be obtained.In some embodiments, step 1002 may operate similar to step 302 asdescribed above.

In a possible implementation, after the obtaining a being-attackeddirection of the target virtual object, the method further includes:determining a display position of being-attacked direction promptinformation according to the being-attacked direction, thebeing-attacked direction prompt information is used for indicating thebeing-attacked direction; and displaying the being-attacked directionprompt information in the UI according to the display position.

Step 1003: Determine, according to the being-attacked direction, ajitter parameter of a virtual weapon held by the target virtual object.

The jitter parameter is a parameter based on which the virtual weaponjitters, and the jitter parameter may include a jitter direction and ajitter angle. Optionally, the determining, according to thebeing-attacked direction, a jitter parameter of a virtual weapon held bythe target virtual object includes: determining a jitter direction and ajitter angle of the virtual weapon according to the being-attackeddirection; the jitter parameter including the jitter direction and thejitter angle, the jitter direction is a direction in which the virtualweapon deviates from an initial position, and the jitter angle is anangle at which the virtual weapon deviates from the initial position.Optionally, the jitter direction is opposite to the being-attackeddirection. Optionally, to improve a display effect of jitter, thevirtual weapon jitters around a fulcrum. Optionally, the jitter anglemay be determined according to a distance between an enemy virtualobject and the target virtual object, which is one example embodiment ofthis application. Optionally, to improve a display effect of the UI, thejitter angle corresponds to an angle threshold, and a maximum jitterangle cannot exceed the angle threshold. The angle threshold may bepreset, which is one example embodiment of this application.

For example, as shown in FIG. 11 , a virtual weapon 1101 corresponds toa fulcrum O point in a three-dimensional coordinate system xyz, and aninitial position of the virtual weapon is located on a z axis of thethree-dimensional coordinate system xyz. When the target virtual objectholding the virtual weapon is attacked from a front left direction, thatis, a positive direction of the x axis, a jitter direction of thevirtual weapon 1101 is determined to be a front right direction, thatis, the positive direction of the x axis, and a jitter angle of thevirtual weapon 1101 is 15 degrees.

Referring back to FIG. 10 , Step 1004: Cause, according to the jitterparameter, the virtual weapon to jitter.

Optionally, the virtual weapon corresponds to a camera model. When afirst-person perspective is used, the camera model is located behind thevirtual weapon and bound to the virtual weapon. Optionally, the cameramodel is not actually displayed in the virtual environment. In otherwords, the camera model is not displayed in the virtual environmentdisplayed in the UI. Optionally, as shown in FIG. 12 , the virtualweapon 1201 corresponds to a camera model. When the target virtualobject holding the virtual weapon 1201 is attacked from a front leftdirection, the virtual weapon 1201 jitters to the right. When thevirtual weapon 1201 jitters, a position of the virtual weapon 1201changes, but a position of the camera model does not change.

In a possible implementation, the causing, according to the jitterparameter, the virtual weapon to jitter includes: causing the virtualweapon to move from the initial position to a target position, thetarget position is a position obtained through rotation by the jitterangle from the initial position along the jitter direction with a presetreference point as a rotation center; and causing the virtual weapon toreturn form the target position to the initial position. The cause ofthe jitter may also be referred to as controlling the jitter. Forexample, as shown in FIG. 13 , the preset reference point is an O point,and according to the jitter direction and the jitter angle determined inFIG. 11 , a virtual weapon 1301 rotates the jitter angle along thejitter direction with the O point as a rotation center, to rotate froman initial position to a target position. After the virtual weapon 1301reaches the target position, the client controls the virtual weapon 1301to return from the target position to the initial position, to completea jitter effect.

Based on the above, according to the technical solutions provided inthis embodiment of this application, a being-attacked direction of avirtual object is obtained, and a virtual weapon held by the virtualobject is controlled according to the being-attacked direction tojitter, to allow a user to perceive the attack and determine thebeing-attacked direction according to a jitter status of the virtualweapon, thereby prompting the being-attacked direction, diversifyingcontent of the being-attacked prompt, and providing more valuableinformation. Furthermore, such a manner is more intuitive and clearer,making it easy to draw the attention of the user.

In a possible implementation, as shown in FIG. 14 , the method forprompting that a virtual object is attacked may alternatively includethe following steps (1401 to 1407):

Step 1401: Determine whether a target virtual object is attacked. Ifyes, perform step 1402. If no, end the procedure.

Step 1402: Obtain a being-attacked direction of the target virtualobject.

Step 1403: Determine a jitter parameter of a virtual weapon according tothe being-attacked direction.

Step 1404: Determine whether the target virtual object is stillattacked. If yes, perform step 1406. If no, perform step 1405.

Step 1405: Cause, according to the jitter parameter, the virtual weaponto jitter.

Step 1406: Determine a new jitter parameter.

Step 1407: Cause, according to the jitter parameter, the virtual weaponto jitter.

The following describes example apparatus embodiments of thisapplication, which can be used to execute the method embodiments of thisapplication. For further details of the apparatus embodiments of thisapplication, refer to the method embodiments of this application.

FIG. 15 is a block diagram of an apparatus for prompting that a virtualobject is attacked according to an embodiment of this application. Theapparatus has functions of implementing the foregoing method examples.The functions may be implemented by using hardware, or may beimplemented by hardware executing corresponding software. The apparatusmay be a mobile terminal or set in a mobile terminal. An apparatus 1500may include: an interface display module 1510, a direction obtainingmodule 1520, a position determination module 1530, and an informationdisplay module 1540.

The interface display module 1510 is configured to display a UI, the UIincluding a target virtual object located in a virtual environment.

The direction obtaining module 1520 is configured to obtain abeing-attacked direction of the target virtual object, thebeing-attacked direction is a direction in which the target virtualobject is attacked.

The position determination module 1530 is configured to determine adisplay position of being-attacked direction prompt informationaccording to the being-attacked direction, the being-attacked directionprompt information is used for indicating the being-attacked direction.

The information display module 1540 is configured to display thebeing-attacked direction prompt information in the UI according to thedisplay position.

In some embodiments, the being-attacked direction prompt informationincludes an arc-shaped UI element. The information display module 1540is further configured to: determine a display position of the arc-shapedUI element according to the being-attacked direction; a position of thearc-shaped UI element relative to a center matching a position of thetarget virtual object relative to an enemy virtual object that launchesthe attack.

In some embodiments, the center overlaps with a central point of a frontsight of a virtual weapon held by the target virtual object.

In some embodiments, as shown in FIG. 16 , the apparatus 1500 furtherincludes a times obtaining module 1550, configured to obtainbeing-attacked times corresponding to the being-attacked direction, thebeing-attacked times are a quantity of times that the target virtualobject is attacked in the being-attacked direction. The informationdisplay module 1540 is further configured to display being-attackedtimes prompt information in the UI, the being-attacked times promptinformation is used for indicating the being-attacked times.

In some embodiments, a display style of the being-attacked directionprompt information is related to at least one type of the followinginformation: a being-attacked distance, a being-attacked time,being-attacked times, or a being-attacked damage.

In some embodiments, the information display module 1540 is furtherconfigured to: cancel the display of the being-attacked direction promptinformation in the UI when a display duration of the being-attackeddirection prompt information reaches a preset duration, and the targetvirtual object is subject to no other attacks from the being-attackeddirection within the preset duration.

In some embodiments, the apparatus 1500 further includes: a directiondetermination module 1560, configured to determine, according to thebeing-attacked direction, a jitter direction of the virtual weapon heldby the target virtual object, the jitter direction is a direction inwhich the virtual weapon deviates from an initial position; and a jittercontrol module 1570, configured to cause the virtual weapon to jitteraccording to the jitter direction.

Based on the above, according to the technical solutions provided inthis embodiment of this application, a display position ofbeing-attacked direction prompt information is determined according to abeing-attacked direction of a virtual object, and the being-attackeddirection prompt information is displayed in a UI, so as to clearly andtimely prompt a user that the virtual object controlled by the user isattacked and prompt the being-attacked direction, thereby resolving theproblem that being-attacked prompt information is relatively obscure inthe related art, and improving human-computer interaction experience.Moreover, in this embodiment of this application, a display style of thebeing-attacked direction prompt information varies with a plurality offactors, thereby diversifying the display style of the being-attackeddirection prompt information and improving a display effect of the UI.

In addition, according to the technical solutions provided in thisembodiment of this application, attacked times prompt information isfurther displayed in the UI according to being-attacked times of thevirtual object, to help the user more clearly know how specifically thevirtual object controlled by the user is attacked, and deal with theattack in time. Further, according to the technical solutions providedin this embodiment of this application, a jitter direction is determinedaccording to the being-attacked direction, and a virtual weapon held bythe virtual object is caused to jitter according to the jitterdirection, which further enhances an effect of the being-attackedprompt.

FIG. 17 is a flowchart of an apparatus for prompting that a virtualobject is attacked according to another embodiment of this application.The apparatus has functions of implementing the foregoing methodexamples. The functions may be implemented by using hardware, or may beimplemented by hardware executing corresponding software. The apparatusmay be a mobile terminal or set in a mobile terminal. An apparatus 1700may include: an interface display module 1710, a direction obtainingmodule 1720, a parameter determination module 1730, and a jitter controlmodule 1740.

The interface display module 1710 is configured to display a UI, the UIincluding a target virtual object located in a virtual environment.

The direction obtaining module 1720 is configured to obtain abeing-attacked direction of the target virtual object, thebeing-attacked direction is a direction in which the target virtualobject is attacked.

The parameter determination module 1730 is configured to determine,according to the being-attacked direction, a jitter parameter of avirtual weapon held by the target virtual object.

The jitter control module 1740 is configured to cause, according to thejitter parameter, the virtual weapon to jitter.

In some embodiments, the jitter control module 1740 is furtherconfigured to: determine a jitter direction and a jitter angle of thevirtual weapon according to the being-attacked direction; the jitterparameter including the jitter direction and the jitter angle, thejitter direction is a direction in which the virtual weapon deviatesfrom an initial position, and the jitter angle is an angle at which thevirtual weapon deviates from the initial position.

In some embodiments, the jitter control module 1740 is furtherconfigured to: cause the virtual weapon to move from the initialposition to a target position, the target position is a positionobtained through rotation by the jitter angle from the initial positionalong the jitter direction with a preset reference point as a rotationcenter; and cause the virtual weapon to return form the target positionto the initial position.

In some embodiments, the jitter direction is opposite to thebeing-attacked direction.

Based on the above, according to the technical solutions provided inthis embodiment of this application, a jitter parameter of a virtualweapon is determined according to a being-attacked direction, and thevirtual weapon is controlled according to the jitter parameter tojitter, which provides a new being-attacked prompt solution throughextension, and can more intuitively prompt in a UI that a virtual objectcontrolled by a user is attacked, thereby improving human-computerinteraction experience.

When the apparatus provided in the foregoing embodiment implements thefunctions of the apparatus, only division of the foregoing functionmodules is used as an example for description. In the practicalapplication, the functions may be allocated to and completed bydifferent function modules according to requirements. That is, aninternal structure of the device is divided into different functionmodules, to complete all or some of the functions described above. Inaddition, the apparatus and method embodiments provided in the foregoingembodiments belong to one conception. The implementation may beaccording to the method embodiments described above, and details are notdescribed herein again.

FIG. 18 is a structural block diagram of a terminal 1800 according to anembodiment of this application. The terminal 1800 may be an electronicdevice, such as a mobile phone, a tablet computer, a game console, anebook reader, a multimedia playback device, computer, or a wearabledevice. The terminal 1800 is configured to implement the method forprompting that a virtual object is attacked provided in the foregoingembodiment. The terminal 1800 may be a mobile terminal that includes aportable electronic device as in the mobile terminal 10 from theimplementation environment shown in FIG. 1 . In one embodiment:

Generally, the terminal 1800 includes a processor 1801 and a memory1802.

The processor 1801 may include one or more processing cores, forexample, may be a 4-core processor or an 8-core processor. The processor1801 may be implemented by using at least one hardware form of a digitalsignal processor (DSP), a field programmable gate array (FPGA), and aprogrammable logic array (PLA). The processor 1801 may alternativelyinclude a main processor and a coprocessor. The main processor is aprocessor configured to process data in an awake state, also referred toas a central processing unit (CPU), and the coprocessor is a low-powerprocessor configured to process data in an idle state. In someembodiments, the processor 1801 may be integrated with a graphicsprocessing unit (GPU). The GPU is configured to be responsible forrendering and drawing content to be displayed by a display screen. Insome embodiments, the processor 1801 may further include an artificialintelligence (AI) processor. The AI processor is configured to process acalculation operation related to machine learning.

The memory 1802 may include one or more computer-readable storage media.The computer-readable storage medium may be non-transient. The memory1802 may further include a high-speed random access memory and anon-transitory memory, such as one or more magnetic disk storage devicesor flash storage devices. In some embodiments, the non-transientcomputer-readable storage medium in the memory 1802 is configured tostore at least one instruction, at least one program, a code set, or aninstruction set, the at least one instruction, the at least one program,the code set, or the instruction set being configured to be executed byone or more processors to implement the method for prompting that avirtual object is attacked.

In some embodiments, the terminal 1800 may optionally include: aperipheral device interface 1803 and at least one peripheral device. Theprocessor 1801, the memory 1802, and the peripheral device interface1803 may be connected by a bus or a signal line. Each peripheral devicemay be connected to the peripheral device interface 1803 by using a bus,a signal cable, or a circuit board. In one embodiment, the peripheraldevice includes at least one of a radio frequency circuit 1804, adisplay screen 1805, a camera 1806, an audio circuit 1807, a positioningcomponent 1808, and a power supply 1809.

A person skilled in the art may understand that the structure shown inFIG. 18 does not constitute a limitation to the terminal 1800, and theterminal may include more or fewer components than those shown in thefigure, or some components may be combined, or a different componentarrangement may be used.

In an example embodiment, a computer-readable storage medium is furtherprovided, the storage medium storing at least one instruction, at leastone program, a code set, or an instruction set, the at least oneinstruction, the at least one program, the code set, or the instructionset, when executed by the processor, implementing the method forprompting that a virtual object is attacked.

Optionally, the computer-readable storage medium may include: aread-only memory (ROM), a random access memory (RAM), a solid statedrive (SSD), an optical disc, or the like. The RAM may include aresistance random access memory (ReRAM) and a dynamic random accessmemory (DRAM).

In an example embodiment, a computer program product is furtherprovided, the computer program product, when executed by the processor,implementing the method for prompting that a virtual object is attacked.

It is to be understood that “a plurality of” mentioned in thespecification means two or more. “And/or” describes an associationrelationship for describing associated objects and represents that threerelationships may exist. For example, A and/or B may represent thefollowing three cases: Only A exists, both A and B exist, and only Bexists. The character “/” in this specification generally indicates an“or” relationship between the associated objects. In addition, the stepnumbers described in this specification merely exemplarily show apossible execution sequence of the steps. In some other embodiments, thesteps may not be performed according to the number sequence. Forexample, two steps with different numbers may be performedsimultaneously, or two steps with different numbers may be performedaccording to a sequence contrary to the sequence shown in the figure.This is not limited in the embodiments of this application.

The foregoing descriptions are merely exemplary embodiments of thisapplication, but are not intended to limit this application. Anymodification, equivalent replacement, or improvement made within thespirit and principle of this application shall fall within theprotection scope of this application.

What is claimed is:
 1. A method for prompting that a virtual object isattacked, the method comprising: displaying a user interface (UI)comprising a target virtual object within a virtual environment;obtaining a being-attacked direction of the target virtual object thatis a direction from which the target virtual object is attacked; andcausing a virtual weapon of the target virtual object to jitter in adirection based on the being-attacked direction.
 2. The method accordingto claim 1, wherein the direction of the jitter is a deviation of thevirtual weapon from an initial position.
 3. The method according toclaim 2, wherein the direction of the jitter is opposite from thebeing-attacked direction.
 4. The method according to claim 1, furthercomprising: displaying being-attacked direction prompt information in adisplay position of the UI that visually indicates the being-attackeddirection.
 5. The method according to claim 4, wherein thebeing-attacked direction prompt information comprises an arc-shaped UIelement; and the displaying further comprises: determining the displayposition of the arc-shaped UI element according to the being-attackeddirection; and a position of the arc-shaped UI element relative to acenter matching a position of the target virtual object relative to anenemy virtual object that launches the attack.
 6. The method accordingto claim 5, wherein the center overlaps with a central point of a frontsight of a virtual weapon held by the target virtual object.
 7. Themethod according to claim 4, wherein after the obtaining thebeing-attacked direction, the method further comprises: obtainingbeing-attacked times corresponding to the being-attacked direction, thebeing-attacked times are a quantity of times that the target virtualobject is attacked in the being-attacked direction; and displayingbeing-attacked times prompt information in the UI, the being-attackedtimes prompt information is used for indicating the being-attackedtimes.
 8. The method according to claim 4, wherein a display style ofthe being-attacked direction prompt information is related to at leastone type of the following information: a being-attacked distance, abeing-attacked time, being-attacked times, or a being-attacked damage.9. The method according to claim 4, wherein after the displaying thebeing-attacked direction prompt information in the UI according to thedisplay position, the method comprises: canceling the display of thebeing-attacked direction prompt information in the UI when a displayduration of the being-attacked direction prompt information reaches apreset duration, and the target virtual object is subject to no otherattacks from the being-attacked direction within the preset duration.10. A method for prompting that a virtual object is attacked, applicableto a mobile terminal, the method comprising: displaying a user interface(UI), the UI comprising a target virtual object located in a virtualenvironment; obtaining a being-attacked direction and a being-attackedtimes of the target virtual object, wherein the being-attacked directionis a direction in which the target virtual object is attacked and thebeing-attacked times is a number of times the target virtual object isattacked; displaying being-attacked direction prompt information in adisplay position of the UI that visually indicates the being-attackeddirection and the being-attacked times.
 11. The method according toclaim 10, wherein a display style of the being-attacked direction promptinformation is based on at least one of: a being-attacked distance, abeing-attacked time, being-attacked times, or a being-attacked damage.12. The method according to claim 10, wherein the being-attackeddirection prompt information comprises an arc-shaped UI element; and thedisplaying further comprises: determining the display position of thearc-shaped UI element according to the being-attacked direction; and aposition of the arc-shaped UI element relative to a center matching aposition of the target virtual object relative to an enemy virtualobject that launches the attack.
 13. The method according to claim 12,wherein the center overlaps with a central point of a front sight of avirtual weapon held by the target virtual object.
 14. The methodaccording to claim 10, wherein a display style of the being-attackeddirection prompt information is related to at least one type of thefollowing information: a being-attacked distance, a being-attacked time,being-attacked times, or a being-attacked damage.
 15. The methodaccording to claim 10, wherein after the displaying the being-attackeddirection prompt information in the UI according to the displayposition, the method comprises: canceling the display of thebeing-attacked direction prompt information in the UI when a displayduration of the being-attacked direction prompt information reaches apreset duration, and the target virtual object is subject to no otherattacks from the being-attacked direction within the preset duration.16. An apparatus for prompting that a virtual object is attacked,comprising: an interface display module, configured to display a userinterface (UI), the UI comprising a target virtual object located in avirtual environment; a direction obtaining module, configured to obtaina being-attacked direction of the target virtual object, thebeing-attacked direction is a direction in which the target virtualobject is attacked; a position determination module, configured todetermine a display position of being-attacked direction promptinformation according to the being-attacked direction, thebeing-attacked direction prompt information is used for indicating thebeing-attacked direction; and an information display module, configuredto display the being-attacked direction prompt information in the UIaccording to the display position and based on a being-attackeddistance, a being-attacked time, being-attacked times, or abeing-attacked damage.
 17. The apparatus of claim 16, wherein thebeing-attacked direction prompt information comprises an arc-shaped UIelement and a position of the arc-shaped UI element is relative to acenter matching a position of the target virtual object relative to anenemy virtual object that launches the attack.
 18. The apparatus ofclaim 16, wherein after displaying the being-attacked direction promptinformation in the UI according to the display position, informationdisplay module is configured to cancel the display of the being-attackeddirection prompt information in the UI when a display duration of thebeing-attacked direction prompt information reaches a preset duration,and the target virtual object is subject to no other attacks from thebeing-attacked direction within the preset duration.
 19. The apparatusof claim 16, further comprising: a parameter determination module,configured to determine, according to the being-attacked direction, ajitter parameter of a virtual weapon held by the target virtual object;and a jitter control module, configured to cause, according to thejitter parameter, a jitter of the virtual weapon in a direction oppositeto the being-attacked direction.
 20. The apparatus of claim 19, whereinthe jitter comprises a jitter direction and a jitter angle, the jitterdirection being a direction in which the virtual weapon deviates from aninitial position and the jitter angle being an angle at which thevirtual weapon deviates from the initial position.